package cn.wusifx.zabbix.request.builder.host;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/hostgroup/update
 */
public class HostGroupUpdateRequestBuilder extends UpdateRequestBuilder {
    private String groupId;
    public HostGroupUpdateRequestBuilder(String auth) {
        super("hostgroup.update", auth);
    }

    public HostGroupUpdateRequestBuilder(Long id, String auth) {
        super("hostgroup.update", id, auth);
    }

    public String getGroupId() {
        return groupId;
    }

    public HostGroupUpdateRequestBuilder setGroupId(String groupId) {
        this.groupId = groupId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("groupid",groupId);
        return baseRequest;
    }
}
